

 	var curDate=new Date();
	var curMonth=curDate.getMonth()+1;
	var curYear=curDate.getFullYear();
	var curDay=curDate.getDate();
	
function fnInitTime(yearName,monthName,modelYearValue,modelMonthValue) {
	var dttime=document.getElementById("dttime");
	//年
	var sel="<select name='"+yearName+"'>";
	for(var i=curYear-10;i<curYear;i++)
	{	
		if(modelYearValue==i){
		 sel=sel+"<option value='"+i+"' selected='selected'>"+i+"年</option>";
		}
		else{
		sel=sel+"<option value='"+i+"' >"+i+"年</option>";
		}
	}
	if(modelYearValue==null||modelYearValue==curYear||modelYearValue==''){
		sel=sel+"<option value='"+curYear+"' selected='selected'>"+curYear+"年</option>";
	}
	else{
		sel=sel+"<option value='"+curYear+"' >"+curYear+"年</option>";
	}
	
	for(var j=curYear+1;j<curYear+10;j++)
	{	
		if(modelYearValue==j){
		 sel=sel+"<option value='"+j+"' selected='selected' >"+j+"年</option>";
		}
		else{
		sel=sel+"<option value='"+j+"' >"+j+"年</option>";
		}
	}
	sel=sel+"</select>";
	//月
	sel=sel+"<select name='"+monthName+"'>";
	for(var z=1;z<=12;z++)
	{	
		
		 if(modelMonthValue==z){
		 	sel=sel+"<option value='"+z+"' selected='selected' >"+z+"月</option>";
		}
		else if(z==curMonth){
			if(modelMonthValue==null||modelMonthValue==''){
		 		sel=sel+"<option value='"+z+"' selected='selected' >"+z+"月</option>";
		 	}
		 	else{
		 		sel=sel+"<option value='"+z+"' >"+z+"月</option>";
		 	}
		}
		else{
			sel=sel+"<option value='"+z+"' >"+z+"月</option>";
		}
	}
	sel=sel+"</select>";
	//alert(sel);
	dttime.innerHTML=sel;
	   
}

function fnInitBeginEndTime(yearName,begmonthName,endmonthName,modelYearValue,beginMonthValue,endMonthValue,selMark) {
var time=document.getElementById("dttime");
	//年
	var sel="";
	if(selMark==''){
		sel="<select name='"+yearName+"'>";
		}
	else {
		sel="<select name='"+yearName+"' onchange='"+selMark+"'>";
	}
	for(var i=curYear-10;i<curYear;i++)
	{	
		if(modelYearValue==i){
		 sel=sel+"<option value='"+i+"' selected='selected' >"+i+"年</option>";
		}
		else{
		sel=sel+"<option value='"+i+"' >"+i+"年</option>";
		}
	}
	if(modelYearValue==null||modelYearValue==curYear||modelYearValue==''){
		sel=sel+"<option value='"+curYear+"' selected='selected'>"+curYear+"年</option>";
	}
	else{
		sel=sel+"<option value='"+curYear+"' >"+curYear+"年</option>";
	}
	
	for(var j=curYear+1;j<curYear+10;j++)
	{	
		if(modelYearValue==j){
		 sel=sel+"<option value='"+j+"' selected='selected' >"+j+"年</option>";
		}
		else{
		sel=sel+"<option value='"+j+"' >"+j+"年</option>";
		}
	}
	sel=sel+"</select>";
	//开始月
	if(selMark==''){
		sel=sel+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name='"+begmonthName+"' >";
		}
	else {
		sel=sel+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name='"+begmonthName+"' onchange='"+selMark+"'>";
	}
	
	
	for(var z=1;z<=12;z++)
	{	
		if(beginMonthValue==z){
		 	sel=sel+"<option value='"+z+"' selected='selected' >"+z+"月</option>";
		}
		else{
			sel=sel+"<option value='"+z+"' >"+z+"月</option>";
		}
	}
	sel=sel+"</select>";
	
	//结束月
	
	if(selMark==''){
		sel=sel+"&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;<select name='"+endmonthName+"' >";
		}
	else {
		sel=sel+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name='"+endmonthName+"' onchange='"+selMark+"'>";
	}
	for(var m=1;m<=12;m++)
	{	
		if(endMonthValue==m){
		 	sel=sel+"<option value='"+m+"' selected='selected' >"+m+"月</option>";
		}
		else if(m==12){
			if(endMonthValue==null||endMonthValue==''){
				sel=sel+"<option value='"+m+"' selected='selected'>"+m+"月</option>";
			}
			else{
				sel=sel+"<option value='"+m+"' >"+m+"月</option>";
			}
		}
		else{
			sel=sel+"<option value='"+m+"' >"+m+"月</option>";
		}
	}
	sel=sel+"</select>";
	time.innerHTML=sel;
	   
}




function fnInitYearMonthDateTime(yearName,monthName,dateName,YearValue,MonthValue,DateValue) {
	var dttime=document.getElementById("dttime");
	//年
	var sel="<select name='"+yearName+"'>";
	for(var i=curYear-10;i<curYear;i++)
	{	
		if(YearValue==i){
		 sel=sel+"<option value='"+i+"' selected='selected'>"+i+"年</option>";
		}
		else{
		sel=sel+"<option value='"+i+"' >"+i+"年</option>";
		}
	}
	if(YearValue==null||YearValue==curYear||YearValue==''){
		sel=sel+"<option value='"+curYear+"' selected='selected'>"+curYear+"年</option>";
	}
	else{
		sel=sel+"<option value='"+curYear+"' >"+curYear+"年</option>";
	}
	
	for(var j=curYear+1;j<curYear+10;j++)
	{	
		if(YearValue==j){
		 sel=sel+"<option value='"+j+"' selected='selected' >"+j+"年</option>";
		}
		else{
		sel=sel+"<option value='"+j+"' >"+j+"年</option>";
		}
	}
	sel=sel+"</select>";
	//月
	sel=sel+"<select name='"+monthName+"'>";
	for(var z=1;z<=12;z++)
	{	
		
		 if(MonthValue==z){
		 	sel=sel+"<option value='"+z+"' selected='selected' >"+z+"月</option>";
		}
		else if(z==curMonth){
			if(MonthValue==null||MonthValue==''){
		 		sel=sel+"<option value='"+z+"' selected='selected' >"+z+"月</option>";
		 	}
		 	else{
		 		sel=sel+"<option value='"+z+"' >"+z+"月</option>";
		 	}
		}
		else{
			sel=sel+"<option value='"+z+"' >"+z+"月</option>";
		}
	}
	sel=sel+"</select>";
	
	//日
	sel=sel+"<select name='"+dateName+"'>";
	for(var d=1;d<=31;d++)
	{	
		
		 if(DateValue==d){
		 	sel=sel+"<option value='"+d+"' selected='selected' >"+d+"日</option>";
		}
		else if(d==curDay){
			if(DateValue==null||DateValue==''){
		 		sel=sel+"<option value='"+d+"' selected='selected' >"+d+"日</option>";
		 	}
		 	else{
		 		sel=sel+"<option value='"+d+"' >"+d+"日</option>";
		 	}
		}
		else{
			sel=sel+"<option value='"+d+"' >"+d+"日</option>";
		}
	}
	sel=sel+"</select>";
	//alert(sel);
	dttime.innerHTML=sel;
	   
}